<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <div id="app">
    <div>{{info}}</div>
    <div v-pre>{{info}}</div>

    <!-- v-html 特点：不要随便解析用户提交的内容   XSS攻击 -->
    <div v-html="info"></div>

    <div v-text="info"></div>
  </div>
  <script src="./vue.js"></script>
  <script>
    const h2 = `<h2>我是标题</h2>`
    const alert = `<script>alert(123)<\/script>`  //用户提交内容，引起页面弹框，所以不要滥用 v-html
    
    new Vue({
      el: '#app',
      data: {
        info: alert
      }
    })
  </script>
</body>
</html>